<template>
	<view class="warp">
		<view class="image">
			<image style="width: 100%;" :src="imageurlf"  mode="widthFix"></image>
		</view>
		<view>
			<image style="width: 100%;" :src="imageurls"  mode="widthFix"></image>
		</view>
		 <view>
		 	<image style="width: 100%;" :src="imageurlt"  mode="widthFix"></image>
		 </view>
		<view class="zhaoshangnum">
			<view class="content">
				<uni-icons color="#fff" type="eye" size="20"></uni-icons>
		           <view class="num">
		           	<span>浏览量:</span>
					<span>{{looknum.viewsZsNum}}</span>
		           </view>
			</view>
		</view>
		<!-- <view class="bottom">
			<view class="right">
				<button class="share_model_pre activity_goods_share" open-type="share">
					<text class="iconfont iconfenxiang"></text>
					<text class="show_text">{{ $L('分享') }}</text>
				</button>
		
			</view>
		</view> -->
		
		<!-- <view class="" style="margin-bottom: 30%;">
			
		</view> -->
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imageurlf:'https://sy-hws-file-oss.oss-cn-beijing.aliyuncs.com/f.jpg',
				imageurls:'https://sy-hws-file-oss.oss-cn-beijing.aliyuncs.com/tow.jpg',
				imageurlt:'https://sy-hws-file-oss.oss-cn-beijing.aliyuncs.com/t.jpg',
				imgurl: getApp().globalData.imgUrl,
				title:"安徽地坪行业二次三届年会正式招商政策",
				url:'https://sy-hws-file-oss.oss-cn-beijing.aliyuncs.com/1117/jie.png',
				id:null,
				looknum:{}
			};
		},
		onShareAppMessage:function(){
			let pathinfo=`/extra/attractInvestment/attractInvestment`
			// let pathinfo='/extra/activityList/activityList'
			return{
				title:this.title,
				path:pathinfo,
				imageUrl:this.imageurl,
			}
			
		},
		onShareTimeline: function() {
				let pathinfo=`/extra/attractInvestment/attractInvestment`
			return {
				title:this.title,
				path:pathinfo,
				imageUrl:this.imageurl,
			}
		},
		onLoad(e) {
			if(e){
				this.id=e.id
			}
			this.addnum()
			this.getlooknum()
		},
		methods:{
			// 增加浏览次数
			addnum(){
				this.$request({
					url:'v3/activity/front/activity/view/add/count',
					method:'GET',
					data:{
						activityId:this.id,
						viewsType:'4'
					}
				})
			},
			// 获取浏览量
			getlooknum(){
			  this.$request({
				  url:'v3/activity/front/activity/view/count',
				  method:'GET',
				  data:{activityId:this.id}
			  }).then(res=>{
				  this.looknum=res.data
			  })	
			},
			goShare(){
				this.$refs.popup.open()
			},
			sldShare(type, scene) {
				// let shareData = {};
				// console.log();
				// let _this= this
				// let {
				// 	goodsData,
				// 	sharePoster
				// } = this;
				 let shareData={}
				if (type == 0) {
					
					
				} else if (type == 2) {
					
					shareData.href = 'https://m.dongzhice.com/extra/attractInvestment/attractInvestment';
					shareData.title = "安徽地坪行业二次三届年会正式招商政策";
					shareData.summary = "";
					shareData.imageUrl = this.imageurl;
					 
					
				}
				this.$weiXinAppShare(type, scene, shareData);
				// this.closeShareModel(); //关闭分享
			},
		}
	}
</script>

<style lang="scss" scoped>
page{
			width: 750rpx;
			margin: 0 auto;
			background: #F5F5F5;
			overflow: hidden;
		}
		.warp{
			 // 浏览数据
			 .zhaoshangnum{
			 	position: fixed;
			 	top: 30%;
			 	right: 10rpx;
			 	.content{
			 		border-radius: 10rpx;
			 		padding: 10rpx;
			 		display: flex;
			 		align-items: center;
			 		background-color:rgba(0, 0, 0, 0.2);
			 		.num{
			 			margin-left: 10rpx;
			 			color: #fff;
			 		}
			 	}
			 }
			
			.bottom{
				width: 100%;
				height: 100rpx;
				background-color: #fff;
				position: fixed;
				bottom: 4rpx;
				// position: relative;
				.right{
					position: absolute;
					right: 50%;
					bottom: 10rpx;
					.activity_goods_share{
						display: flex;
						flex-direction: column;
						align-items: center;
						margin-left: 15rpx;
						
						.iconfont {
							font-size: 44rpx;
						}
						
						.show_text {
							font-size: 22rpx;
							font-family: PingFang SC;
							font-weight: 500;
							color: #2d2d2d;
						}
					}
				}
				
				
			}
		}
</style>
